//
//  ClassCell.m
//  BeautyClother
//
//  Created by dllo on 15/8/25.
//  Copyright (c) 2015年 宋爽. All rights reserved.
//

#import "ClassCell.h"

@interface ClassCell ()

@property (nonatomic, assign) CGFloat offWidth;
@property (nonatomic, assign) CGFloat offHeight;

@end

@implementation ClassCell

- (void)dealloc
{
    [_image release];
    [_title release];
    [super dealloc];
}

- (instancetype)initWithFrame:(CGRect)frame
{
    
    self = [super initWithFrame:frame];
    if (self) {
        self.offWidth = [[UIScreen mainScreen]bounds].size.width / 375;
        self.offHeight = [[UIScreen mainScreen]bounds].size.height / 667;
        self.image = [[UIImageView alloc]init];
        [self.contentView addSubview:self.image];
        [_image release];
        
        self.title = [[UILabel alloc]init];
        [self.contentView addSubview:self.title];
        [_title release];
    }
    return self;
}

- (void)layoutSubviews
{
    [super layoutSubviews];
    self.image.frame = CGRectMake(0, 0, 80 *_offWidth, 80 *_offHeight);
    self.title.frame = CGRectMake(0, 80 *_offHeight, 80 *_offWidth, 20 *_offHeight);
    self.title.textAlignment = 1;

}


@end
